<?php

namespace app\admin\validate;

use think\Validate;

class BannerValidate extends Validate
{
    protected $rule =   [
        'type' => 'require',
        'image_id' => 'require',
        'title' => 'require',
        'price' => 'require',
        'content' => 'require',
    ];

    protected $message = [
        'type.require' => '缺少参数type',
        'image_id.require' => '缺少参数image_id',
        'title.require' => '缺少参数title',
        'price.require' => '缺少参数price',
        'content.require' => '缺少参数content',
    ];

    protected $scene = [
        'add' => ['type'],
        'addNotice' => ['title', 'content'],
        'adCommentBg' => ['image', 'type', 'price', 'sort'],
    ];
}